<?php

use Illuminate\Routing\Router;

Route::group([
    'prefix'        => 'admin/DecoCalculator',
    'namespace'     => 'Beerus\\Modules\\DecoCalculator\\Controllers',
    'middleware'    => [
        'web',
        'admin',
    ],
], function (Router $router) {
    // 设计费配置
    $router->get('/design', 'DesignController@index');
    $router->get('/design/create', 'DesignController@edit');
    $router->get('/design/{id}/edit', 'DesignController@edit');
    $router->post('/design/save', 'DesignController@editSubmit');
    $router->delete('/design/{id}', 'DesignController@delete');

    // 人工费配置
    $router->get('/artificial', 'ArtificialController@index');
    $router->get('/artificial/create', 'ArtificialController@edit');
    $router->get('/artificial/{id}/edit', 'ArtificialController@edit');
    $router->post('/artificial/save', 'ArtificialController@editSubmit');
    $router->delete('/artificial/{id}', 'ArtificialController@delete');

    // 设计费配置
    $router->get('/material', 'MaterialController@index');
    $router->get('/material/create', 'MaterialController@edit');
    $router->get('/material/{id}/edit', 'MaterialController@edit');
    $router->post('/material/save', 'MaterialController@editSubmit');
    $router->delete('/material/{id}', 'MaterialController@delete');

    // 白名单配置
    $router->get('/white', 'WhiteController@index');
    $router->get('/white/create', 'WhiteController@edit');
    $router->post('/white/save', 'WhiteController@editSubmit');
    $router->delete('/white/{id}', 'WhiteController@delete');
    $router->get('/white/export', 'WhiteController@export');

    // 软装费配置
    $router->get('/soft', 'SoftController@index');
    $router->get('/soft/create', 'SoftController@edit');
    $router->get('/soft/{id}/edit', 'SoftController@edit');
    $router->post('/soft/save', 'SoftController@editSubmit');
    $router->delete('/soft/{id}', 'SoftController@delete');
});
